Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change birthdate to age #937

Merged
merged 6 commits into from
Nov 15, 2024
Merged

Change birthdate to age #937

merged 6 commits into from
Nov 15, 2024

Conversation

allennatang
Copy link
Contributor

Tickets:

#936

Related to dashboard issue: hackmcgill/dashboard#1003

  • HAC-

List of changes:

Changed hacker account's birthdate field to age field to match MLH guidelines.

Created function ageValidator() in hackerAPI\middlewares\validators\validator.helper.js to validate that age is between 0 and 100
Commented out getAge function which calculates hackers' ages from their birthdate.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

The UI side of the dashboard seems to work since you can only input ages from 1 to 99.

Questions for code reviewers?

How to do more testing?

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Listed change(s) in the Changelog
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules

Copy link

vercel bot commented Nov 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hacker-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 11:54pm

@allennatang allennatang changed the title Feat/change birthdate to age Change birthdate to age Nov 6, 2024
@allennatang
Copy link
Contributor Author

The most recent commit also contains the changes for this related dashboard issue hackmcgill/dashboard#1013 where I added a country of residence field to the hacker application. In the hackerAPI, I added validation (checking that the field is not empty) and I also added it to the example api data (not sure if that was necessary, but doesn't do anything).

Copy link
Contributor

@tektaxi tektaxi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure why that test is failing, works according to my tests. need to merge for mlh requirements.

@tektaxi tektaxi merged commit 5b6abd6 into dev Nov 15, 2024
2 of 3 checks passed
@tektaxi tektaxi deleted the feat/change_birthdate_to_age branch November 15, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants